import request from '@/utils/request'

export function getInfo(token) {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: { token }
  })
}

export function login(data) {
  return request({
    // url: `sys/login/doLogin`,
    url: '/api/users/login',
    method: 'post',
    data
  })
}

export function verify(data) {
  return request({
    url: '/api/verify',
    method: 'post',
    data
  })
}

export function changePassword(data) {
  return request({
    url: '/api/users/change_password',
    method: 'post',
    data
  })
}

export function getCityChannel(row) {
  return request({
    url: '/api/users/city_channel',
    method: 'get',
    params: {
      ...row
    }
  })
}

export function getChannels(row) {
  return request({
    url: '/api/users/channels',
    method: 'get',
    params: {
      ...row
    }
  })
}

export function getAddCity(row) {
  return request({
    url: '/api/users/add_city',
    method: 'get',
    params: {
      ...row
    }
  })
}
